package edu.whut.mall.pojo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
/**
 * Author: smq
 * Unit: D9lab
 * Date: 2021-06-07 16:15
 */
@Data
@Builder
@AllArgsConstructor
public class ProductType implements Serializable {
    private static final long serialVersionUID = 10;

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String type;
    private Date createTime;
    private Date updateTime;

    public ProductType(){
        this.createTime = new Date();
    }

    public ProductType(String type) {
        this.type = type;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    public ProductType(int id, String type) {
        this.id = id;
        this.type = type;
        this.updateTime = new Date();
    }
}
